﻿using System;
using System.Collections.Generic;
using System.Text;
using net.veekee.common.reflection;
using net.veekee.logprocessor.plugin.output;
using net.veekee.common;
using net.veekee.logprocessor.plugin.input;
using net.veekee.common.designpattern;
using System.Data.Common;

namespace net.veekee.logprocessor.plugin.gen.datasource
{
    public class DBConnection : IDisposable
    {
        public virtual bool IsConnected
        {
            get
            {
                return false;
            }
        }

        public virtual bool Connect(String cs)
        {
            return false;
        }

        public virtual void Disconnect()
        {
        }

        public void Dispose()
        {
            this.Disconnect();
        }

        public virtual int Execute(String sql, Action<DbDataReader> action)
        {
            return -1;
        }

        public virtual int ExecuteNonQuery(String sql)
        {
            return -1;
        }

        public virtual void BeginTransaction()
        {
        }

        public virtual void EndTransaction(bool autocommit = true)
        {
        }

        public virtual void Commit()
        {
        }

        public virtual void Rollback()
        {
        }
    }
}
